<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>   
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>쇼핑몰 관리자 홈페이지</title>
<link rel="stylesheet" href="/resources/common/adminCommon.css">
<script type="text/javascript" src="/resources/js/jquery-1.10.2.js"></script>
<script>
<!-- jquery로 파일 첨부 추가 -->
$(document).ready(function() {
    //add more file components if Add is clicked
    $('#addFile').click(function() {
        var fileIndex = $('#fileview tr').children().length;      
        $('#fileview').append(
                '<tr><td>'+
                '   <input type="file" name="file" />'+
                '</td></tr>');
    });     
});
</script>
</head>

<body bgcolor="white" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">


<center>
<br>
<!-- 최상위 헤더의 메뉴 -->
<jsp:include page="../main_header.jsp" flush="true"></jsp:include>
<br>
<br>
<form name="form1" method="post" action="productInsert" enctype="multipart/form-data">
<table width="800" border="1" cellspacing="0" cellpadding="3" bordercolordark="white" bordercolorlight="black">

	<tr> 
		<td width="100" bgcolor="#CCCCCC" align="center">상품명</td>
		<td width="700" bgcolor="#F2F2F2">
			<input type="text" name="name" size="60" maxlength="60">
		</td>
	</tr>
	<tr> 
		<td width="100" bgcolor="#CCCCCC" align="center">분류</td>
		<td width="700" bgcolor="#F2F2F2">
			<select name="category">
			  <option value="Outwear">Outwear</option>
			  <option value="Shirt">Shirt</option>
			  <option value="Sweater">Sweater</option>
			  <option value="Pants">Pants</option>
			  <option value="Jeans">Jeans</option>
			  <option value="Shoes">Shoes</option>
			</select>
		</td>
	</tr>
	<tr> 
		<td width="100" bgcolor="#CCCCCC" align="center">판매가</td>
		<td width="700" bgcolor="#F2F2F2">
			<input type="text" name="price" size="12" maxlength="12"> 원
		</td>
	</tr>
	<tr> 
		<td width="100" bgcolor="#CCCCCC" align="center">옵션</td>
    <td width="700" bgcolor="#F2F2F2">
			<select name="opt1">
				<option value="0" selected>옵션선택</option>
				<c:forEach items="${Option}" var="option">
					<option value="${option.no	}">${option.name}</option>
				</c:forEach>
			</select> &nbsp; &nbsp; 

			<select name="opt2">
				<option value="0" selected>옵션선택</option>
				<c:forEach items="${Option}" var="option">
					<option value="${option.no}">${option.name}</option>
				</c:forEach>
			</select> &nbsp; &nbsp; 
		</td>
	</tr>
	<tr> 
		<td width="100" bgcolor="#CCCCCC" align="center">제품설명</td>
		<td width="700" bgcolor="#F2F2F2">
			<textarea name="description" rows="10" cols="80"></textarea>
		</td>
	</tr>
	<tr> 
		<td width="100" bgcolor="#CCCCCC" align="center">상품상태</td>
    <td width="700" bgcolor="#F2F2F2">
			<input type="radio" name="status" value="1" checked> 판매중
			<input type="radio" name="status" value="2"> 판매중지
			<input type="radio" name="status" value="3"> 품절
		</td>
	</tr>
	
	<tr> 
		<td width="100" bgcolor="#CCCCCC" align="center">아이콘</td>
		<td width="700" bgcolor="#F2F2F2">
			<input type="checkbox" name="icon_new" value="1"> New &nbsp;&nbsp	
			<input type="checkbox" name="icon_hit" value="1"> Hit &nbsp;&nbsp	
			<input type="checkbox" name="icon_sale" value="1" onclick="form1.discount.disabled=!form1.discount.disabled;"> Sale &nbsp;&nbsp
			할인율 : <input type="text" name="discount" value="0" size="3" maxlength="3" disabled> 
		</td>
	</tr>
</table>

    <input id="addFile" type="button" value="File Add" />    
    <table id="fileview">
        <tr>
            <td><input name="file" type="file" /></td>
        </tr>        
    </table>


<table width="800" border="0" cellspacing="0" cellpadding="7">
	<tr> 
		<td align="center">
			<input type="submit" value="등록하기"> &nbsp;&nbsp
			<input type="button" value="이전화면" onClick="javascript:history.back();">
		</td>
	</tr>
</table>
</form>
</center>

</body>
</html>